package com.mayn.job;

import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.mayn.jst.erp.action.ShopUnionFeeAction;

public class GetAllShopUnionFeeDataJob implements Job{
		private static final Logger LOG = LoggerFactory.getLogger(GetAllShopUnionFeeDataJob.class);

		@Override
		public void execute(JobExecutionContext context) throws JobExecutionException {
			long starTime = System.currentTimeMillis();
			LOG.info("JobStart--开始执行");

//			Date currTime = new Date();//当前时间
			Date currTime =  new Date(new Date().getTime()-24*60*60*1000);//前一天
			try {
				//淘宝客
				ShopUnionFeeAction.TestShopUnionFee(currTime);
			} catch (Exception e) {
				e.printStackTrace();
			}

			long endTime = System.currentTimeMillis();
			long Time = endTime - starTime;
			LOG.info("JobEnd--执行结束,耗时" + Time / 1000 + "秒");
		}

		
	}

